<template>
	<view :style="themeColor">
		<view class="page">
			<view class="flex benben-position-layout flex flex-wrap align-center offlineOnline_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center justify-between flex-sub offlineOnline_fd0_0'>
					<view class='flex flex-wrap align-center offlineOnline_fd0_0_c0' @tap.stop="handleJumpDiy"
						data-type="back" data-url="1">
						<text class='fu-iconfont2  offlineOnline_fd0_0_c0_c0'>&#xE794;</text>
					</view>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<view class="loading_css" v-if="isShow">
				<u-loading size="36" color="#AD3823"></u-loading>
				<view>加载中</view>
			</view>
			<block v-else>
				<!---flex布局flex布局开始-->
				<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout">
					<view class='flex flex-wrap align-center offlineOnline_fd1_0'>
						<text class='offlineOnline_fd1_0_c0' style="font-family: Alimama DongFangDaKai;">国潮小剧场</text>
					</view>
				</view>

				<!---flex布局flex布局结束-->
				<!---flex布局flex布局开始-->
				<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout offlineOnline_flex_2"
					style="font-family: Alimama DongFangDaKai;">
					<view class='flex flex-wrap align-center offlineOnline_fd2_0' v-for="(v, k) in list" :key="k"
						@tap.stop="goStudy(v)">
						<text class='offlineOnline_fd2_0_c0' v-if="k < 9">0{{k+1}}</text>
						<text class='offlineOnline_fd2_0_c0' v-else>{{k+1}}</text>
						<view class='flex flex-direction flex-wrap align-stretch offlineOnline_fd2_0_c1'>
							<text class='offlineOnline_fd2_0_c1_c0'>{{v.name}}</text>
							<text class='offlineOnline_fd2_0_c1_c1'>{{v.nums}}位同学已学习</text>
						</view>
						<image v-if="v.status == 2" class='offlineOnline_fd2_0_c2' mode="aspectFill"
							:src='STATIC_URL+"508.png"'></image>
						<image v-if="v.status == 0" class='offlineOnline_fd2_0_c2' mode="aspectFill"
							:src='STATIC_URL+"509.png"'></image>
						<view class="offlineOnline_fd2_1_c2" v-if="v.status == 1">
							<l-liquid  :current.sync="modelVale" :percent="v.progress" outline>
								<text style="font-size: 40rpx;color: #BAC67F;">{{v.progress}}</text>
								<text style="font-size: 24rpx;color: #BAC67F;">%</text>
							</l-liquid>
						</view>
					
					</view>
				</view>
				
				<!-- <view class="chenjin">
					<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout">
						<view class='flex flex-wrap align-center offlineOnline_fd1_0'>
							<text class='offlineOnline_fd1_0_c0' style="font-family: Alimama DongFangDaKai;">沉浸小剧场</text>
						</view>
					</view>
					
					
					
					<view class="flex benben-flex-layout flex-wrap align-center littleTheatre_flex_1">
						<view class='flex flex-direction flex-wrap align-stretch littleTheatre_fd1_0'>
							<text class='littleTheatre_fd1_0_c0'>小剧场简介：</text>
							<view class='littleTheatre_fd1_0_c1'>
								<u-parse :html="course_desc"></u-parse>
							</view>
						</view>
					</view>
					<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout">
						<view class='flex flex-direction flex-wrap align-stretch littleTheatre_fd2_0'>
							<view class='flex flex-wrap align-center littleTheatre_fd2_0_c0'>
								<text class='littleTheatre_fd2_0_c0_c0'>沉浸体验：</text>
							</view>
							<view
								class='flex flex-direction flex-wrap align-stretch littleTheatre_fd2_0_c1'
								v-for="(item, index) in lists"
								:key="index"
								:style="{backgroundImage: 'url(' + item.image + ')'}"
							>
								<image
									class='littleTheatre_fd2_0_c1_c0'
									mode="aspectFill"
									:src='STATIC_URL+"515.png"'
								>
								</image>
								<view class='flex flex-direction flex-wrap align-center littleTheatre_fd2_0_c1_c1'>
									<text class='littleTheatre_fd2_0_c1_c1_c0'>{{item.name}}{{item.nums}}个</text>
									<text class='littleTheatre_fd2_0_c1_c1_c1'>（{{item.category_name}}）</text>
								</view>
								<view
									class='flex flex-wrap align-center justify-center littleTheatre_fd2_0_c1_c2_c0'
									v-if="item.is_buy == 0"
									@tap.stop="goBuyCourse(item)"
								>
									<text class='littleTheatre_fd2_0_c1_c2_c0_c0'>立即解锁</text>
								</view>
								<view
									class='flex flex-wrap align-center justify-center littleTheatre_fd2_0_c1_c2_c0'
									v-if="item.is_buy == 1"
									@tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/shouye/buyOffline/buyOffline?order_sn=${item.order_sn}`"
								>
									<text class='littleTheatre_fd2_0_c1_c2_c0_c0'>去学习</text>
								</view>
								
							</view>
						</view>
					</view>
				</view> -->

				<!---flex布局flex布局结束-->
				<view
					class="flex flex-direction flex-wrap align-stretch benben-position-layout flex offlineOnline_flex_3">
					<view class='flex flex-wrap align-center offlineOnline_fd3_0' style="height: 100%;">
						<button open-type="contact" class='flex flex-direction flex-wrap align-stretch share_contact'>
							<image class='offlineOnline_fd3_0_c0_c0' mode="aspectFit" :src='STATIC_URL+"511.png"'>
							</image>
							<text class='offlineOnline_fd3_0_c0_c1'>客服</text>
						</button>
						<view class='flex flex-direction flex-wrap align-stretch offlineOnline_fd3_0_c1' @tap.stop="popupShow1697867527634=true">
							<image class='offlineOnline_fd3_0_c0_c0' mode="aspectFit" :src='STATIC_URL+"512.png"'>
							</image>
							<text class='offlineOnline_fd3_0_c0_c1'>分享</text>
						</view>
						<button class='offlineOnline_fd3_0_c2' @tap.stop="isBuy">沉浸小剧场</button>
					</view>
				</view>

			</block>

			<!-- <view :style="{height: '115rpx'}"></view> -->
			
			
			
			<!---flex布局flex布局结束-->
			<benben-popup v-model="popupShow1697867527634" :mask="true" :mask-close-able="true" mode='bottom'
				:z-index='999'>
				<!---flex布局flex布局开始-->
				<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout">
					<view class='flex flex-direction flex-wrap align-stretch maTtention_fd2_0'>
						<view class='flex flex-wrap align-center justify-between maTtention_fd2_0_c0'>
							<view class='flex flex-wrap align-center maTtention_fd2_0_c0_c0'>
							</view>
							<view class='flex flex-wrap align-center'>
								<image class='maTtention_fd2_0_c0_c1_c0' mode="aspectFit"
									:src='STATIC_URL+"556.png"'>
								</image>
								<text class='maTtention_fd2_0_c0_c1_c1'
									style="font-family: Alimama DongFangDaKai;">分享到</text>
								<image class='maTtention_fd2_0_c0_c1_c0' mode="aspectFit"
									:src='STATIC_URL+"557.png"'>
								</image>
							</view>
							<view class='flex flex-wrap align-center'>
								<image class='maTtention_fd2_0_c0_c2_c0' mode="aspectFit"
									:src='STATIC_URL+"558.png"' @tap.stop="popupShow1697867527634=false"></image>
							</view>
						</view>
						<view class='flex flex-wrap align-center justify-between maTtention_fd2_0_c1'>
							<button open-type="share"
								class='flex flex-direction flex-wrap align-center maTtention_fd2_0_c1_c0 share_btn'>
								<image class='maTtention_fd2_0_c1_c0_c0' mode="aspectFit"
									:src='STATIC_URL+"652.png"'>
								</image>
								<text class='maTtention_fd2_0_c1_c0_c1 share_text'>微信好友</text>
							</button>
							<button open-type="share"
								class='flex flex-direction flex-wrap align-center maTtention_fd2_0_c1_c0 share_btn'>
								<image class='maTtention_fd2_0_c1_c0_c0' mode="aspectFit"
									:src='STATIC_URL+"559.png"'>
								</image>
								<text class='maTtention_fd2_0_c1_c0_c1 share_text'>朋友圈</text>
							</button>
						</view>
					</view>
				</view>
			</benben-popup>
		</view>
	</view>
</template>
<script>
	export default {
		components: {},


		data() {
			return {
				popupShow1697867527634: false,
				isShow: true,
				list: [],
				lists: [],
				modelVale: 0,
				target: 80,
				course_desc: "",
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onShareAppMessage(res) {
			let _this = this;
			if (res.from === 'button') { // 来自页面内分享按钮
				console.log(res.target)
			}
			return {
				title: '国潮小剧',
				path: '/pages/tabBar/homePage/homePage',
				imageUrl: '/static/logo.png'
			}
		},
		onLoad(options) {
			this.getCourse_desc();
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {
			this.getData();
			this.getDatas();
		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			// 体验小剧场  6554aed3431f3
			getData() {
				this.$api.post(global.API_VERSION + '658396690d90b', {

				}).then(res => {
					console.log(res);
					this.isShow = false;
					if (res.data.code == 1) {
						this.list = res.data.data;
					} else {
						this.$message.info(res.data.msg);
					}
				})
			},
			
			
			// 小剧场简历  6554aee801b99
			getCourse_desc() {
				this.$api.post(global.API_VERSION + '6554aee801b99', {
			
				}).then(res => {
					// console.log(res);
					if (res.data.code == 1) {
						this.course_desc = res.data.data.course_desc;
					} else {
						this.$message.info(res.data.msg);
					}
				})
			},
			// 沉浸小剧场  6554af27b84fd
			getDatas() {
				this.$api.post(global.API_VERSION + '6554af27b84fd', {
			
				}).then(res => {
					// console.log(res);
					// this.isShow = false;
					if (res.data.code == 1) {
						this.lists = res.data.data;
					} else {
						this.$message.info(res.data.msg);
					}
				})
			},
			// 购买
			goBuyCourse(item) {
				let course_name = item.name + item.nums + '个' + '(' + item.category_name + ')';
				uni.navigateTo({
					url: '/pages/shouye/buyNow/buyNow?course_name=' + course_name + '&aid=' + item.aid +
						'&price=' + item.price
				})
			},
			// 沉浸小剧场体验  6555ddf1dc0ff
			isBuy() {
				this.$api.post(global.API_VERSION + '6555ddf1dc0ff', {

				}).then(res => {
					// console.log(res);
					if (res.data.code == 1) {
						if (res.data.data.order_sn) {
							global.course_order = res.data.data.order_sn;
							uni.navigateTo({
								url: '/pages/shouye/buyOffline/buyOffline?order_sn=' + res.data.data
									.order_sn
							})
						} else {
							uni.navigateTo({
								url: '/pages/shouye/littleTheatre/littleTheatre'
							})
						}
					} else {
						this.$message.info(res.data.msg);
					}
				})
			},
			// 去学习
			goStudy(item) {
				if (item.aid == -1) {
					uni.navigateTo({
						url: '/pages/shouye/offlineOnline/offlineOnlineTwo'
					})
				} else if (item.aid == -2) {
					this.isBuy();
				} else {
					uni.navigateTo({
						url: '/pages/shouye/study/study?aid=' + item.aid + '&data_type=' + item.data_type
					})
				}
				
			},
		}
	};
</script>
<style lang="scss" scoped>
	.chenjin {
		// width: 100vw;
		// background: url(https://www.guochaoxiaoju.com/uploads/mini/513.png) no-repeat;
		// background-size: 100% 100%;
	}
	.share_contact {
		padding: 0;
		margin: 0;
		background: #FFFFFF;
		line-height: 34rpx;
	}
	
	page {
		font-family: Alimama DongFangDaKai;
	}
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: url(https://www.guochaoxiaoju.com/uploads/mini/507.png) no-repeat;
		background-size: 100% 100%;
	}

	.offlineOnline_flex_0 {
		// background: url(https://www.guochaoxiaoju.com/uploads/mini/507.png) no-repeat;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.offlineOnline_fd0_0_c0_c0 {
		font-size: 36rpx;
		color: var(--benbenFontColor3);
	}

	.offlineOnline_fd0_0_c0 {
		width: 120rpx;
	}

	.offlineOnline_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
	}

	.offlineOnline_fd1_0_c0 {
		color: #FFFFFF;
		font-size: 64rpx;
		font-weight: 400;
	}

	.offlineOnline_fd1_0 {
		margin: 24rpx 30rpx 88rpx 30rpx;
	}

	.offlineOnline_flex_2 {
		border: 2px solid rgba(147, 156, 100, 1);
		background: #FFFFFF;
		margin: 0rpx 32rpx 0rpx 32rpx;
		border-radius: 16rpx;
		background-size: 100% auto;
		padding: 0rpx 32rpx 0rpx 32rpx;
	}

	.offlineOnline_fd2_1_c2_c1 {
		color: #FFFFFF;
		font-size: 20rpx;
		font-weight: 400;
	}

	.offlineOnline_fd2_1_c2_c0 {
		color: #FFFFFF;
		font-size: 40rpx;
		font-weight: 400;
	}

	.offlineOnline_fd2_1_c2 {
		// background: url(https://www.guochaoxiaoju.com/uploads/mini/510.png) no-repeat;
		margin: 0rpx 0rpx 0rpx auto;
		width: 102rpx;
		height: 102rpx;
		border-radius: 51rpx;
		background-size: 100% auto;
	}

	.offlineOnline_fd2_0_c2 {
		width: 102rpx;
		height: 102rpx;
		border-radius: 51rpx;
		margin: 0rpx 0rpx 0rpx auto;
	}

	.offlineOnline_fd2_0_c1_c1 {
		color: #333333;
		font-size: 28rpx;
		font-weight: 400;
		margin: 19rpx 0rpx 0rpx 0rpx;
	}

	.offlineOnline_fd2_0_c1_c0 {
		color: #333333;
		font-size: 40rpx;
		font-weight: 400;
	}

	.offlineOnline_fd2_0_c1 {
		margin: 0rpx 0rpx 0rpx 24rpx;
	}

	.offlineOnline_fd2_0_c0 {
		color: #333333;
		font-size: 96rpx;
		font-weight: 400;
	}
	.offlineOnline_fd2_0_c0_x {
		color: #333333;
		font-size: 72rpx;
		font-weight: 400;
	}

	.offlineOnline_fd2_0 {
		border-bottom: 1px solid rgba(221, 221, 221, 1);
		padding: 38rpx 0rpx 38rpx 0rpx;
	}

	.offlineOnline_flex_3 {
		background: #FFFFFF;
		height: 115rpx;
		overflow: hidden;
		z-index: 10;
		bottom: 0;
		padding-bottom: env(safe-area-inset-bottom);
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		width: 750rpx;
	}

	.offlineOnline_fd3_0_c2 {
		background: linear-gradient(90deg, #BB4834 0%, #96301D 100%);
		border-radius: 44rpx 44rpx 44rpx 44rpx;
		width: 317rpx;
		line-height: 88rpx;
		font-size: 36rpx;
		color: #FFFFFF;
		height: 88rpx;
		font-weight: 400;
		margin: 0rpx 0rpx 0rpx auto;
		font-family: Alimama DongFangDaKai;
	}

	.offlineOnline_fd3_0_c1 {
		margin: 0rpx 0rpx 0rpx 44rpx;
	}

	.offlineOnline_fd3_0_c0_c1 {
		color: #666666;
		font-size: 22rpx;
		font-weight: 400;
		margin: 6rpx 0rpx 0rpx 0rpx;
	}

	.offlineOnline_fd3_0_c0_c0 {
		width: 48rpx;
		height: 48rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.offlineOnline_fd3_0 {
		padding: 0rpx 30rpx 0rpx 32rpx;
	}
	
	
	
	.maTtention_fd2_0_c1_c0_c1 {
		color: #333333;
		font-size: 24rpx;
		font-weight: 400;
		margin: 16rpx 0rpx 0rpx 0rpx;
	}
	
	.maTtention_fd2_0_c1_c0_c0 {
		width: 64rpx;
		height: 64rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}
	
	.maTtention_fd2_0_c1_c0 {
		margin: 0rpx 0rpx 0rpx 0rpx;
	}
	
	.maTtention_fd2_0_c1 {
		padding: 67rpx 150rpx 69rpx 150rpx;
	}
	
	.maTtention_fd2_0_c0_c2_c0 {
		width: 40rpx;
		height: 40rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}
	
	.maTtention_fd2_0_c0_c1_c1 {
		color: #333333;
		font-size: 32rpx;
		font-weight: 500;
		margin: 0rpx 20rpx 0rpx 20rpx;
	}
	
	.maTtention_fd2_0_c0_c1_c0 {
		width: 28rpx;
		height: 10rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}
	
	.maTtention_fd2_0_c0_c0 {
		width: 40rpx;
		height: 40rpx;
	}
	
	.maTtention_fd2_0_c0 {
		padding: 40rpx 32rpx 0rpx 32rpx;
	}
	
	.maTtention_fd2_0 {
		background: var(--benbenbgColor1);
		border-radius: 24rpx 24rpx 0rpx 0rpx;
		background-size: 100% auto;
	}
	
	
	.share_btn {
		padding: 0;
		margin: 0;
		background: transparent;
		line-height: 32rpx;
		.share_text {
			transform: translateY(5rpx);
		}
	}
	
	
	
	.littleTheatre_flex_1 {
		padding: 39rpx 30rpx 0rpx 30rpx;
	}
	
	.littleTheatre_fd1_0_c1 {
		color: #333333;
		font-size: 32rpx;
		font-weight: 400;
		line-height: 50rpx;
	}
	
	.littleTheatre_fd1_0_c0 {
		color: #333333;
		font-size: 40rpx;
		font-weight: 400;
		margin: 0rpx 0rpx 20rpx 0rpx;
	}
	
	.littleTheatre_fd1_0 {
		background: #FFFFFF;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		width: 690rpx;
		padding: 32rpx 24rpx 32rpx 24rpx;
		margin: 0rpx 0rpx 30rpx 0rpx;
	}
	
	.littleTheatre_fd2_0_c7 {
		background: url(https://www.guochaoxiaoju.com/uploads/mini/518.png) no-repeat;
		background-size: 100% auto;
		position: relative;
		margin: 0rpx 0rpx 24rpx 0rpx;
	}
	
	.littleTheatre_fd2_0_c6 {
		background: url(https://www.guochaoxiaoju.com/uploads/mini/519.png) no-repeat;
		background-size: 100% auto;
		position: relative;
		margin: 0rpx 0rpx 24rpx 0rpx;
	}
	
	.littleTheatre_fd2_0_c5 {
		background: url(https://www.guochaoxiaoju.com/uploads/mini/517.png) no-repeat;
		background-size: 100% auto;
		position: relative;
		margin: 0rpx 0rpx 24rpx 0rpx;
	}
	
	.littleTheatre_fd2_0_c4 {
		background: url(https://www.guochaoxiaoju.com/uploads/mini/516.png) no-repeat;
		background-size: 100% auto;
		position: relative;
		margin: 0rpx 0rpx 24rpx 0rpx;
	}
	
	.littleTheatre_fd2_0_c1_c2_c0_c0 {
		color: #AD3823;
		font-size: 28rpx;
		font-weight: 400;
	}
	
	.littleTheatre_fd2_0_c1_c2_c0 {
		background: #FFFFFF;
		width: 144rpx;
		height: 52rpx;
		// transform: translateY(-12rpx);
		position: absolute;
		bottom: 0;
		right: 0;
		border-radius: 24rpx 16rpx 0 0;
	}
	
	.littleTheatre_fd2_0_c1_c1_c1 {
		color: #333333;
		font-size: 34rpx;
		font-weight: 400;
		margin: 15rpx 0rpx 4rpx 0rpx;
	}
	
	.littleTheatre_fd2_0_c1_c1_c0 {
		color: #333333;
		font-size: 48rpx;
		font-weight: 400;
	}
	
	.littleTheatre_fd2_0_c1_c1 {
		margin: 56rpx 0rpx 0rpx 0rpx;
	}
	
	.littleTheatre_fd2_0_c1_c0 {
		width: 56rpx;
		height: 56rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		position: absolute;
		left: 24rpx;
		top: 24rpx;
	}
	
	.littleTheatre_fd2_0_c1 {
		// background: url(https://www.guochaoxiaoju.com/uploads/mini/514.png) no-repeat;
		background-size: 100% 220rpx;
		background-repeat: no-repeat;
		position: relative;
		margin: 0rpx 0rpx 24rpx 0rpx;
		height: 220rpx;
	}
	
	.littleTheatre_fd2_0_c0_c0 {
		color: #333333;
		font-size: 40rpx;
		font-weight: 400;
	}
	
	.littleTheatre_fd2_0_c0 {
		padding: 24rpx 0rpx 24rpx 0rpx;
	}
	
	.littleTheatre_fd2_0 {
		background: #F7F6F4;
		border-radius: 32rpx 32rpx 0rpx 0rpx;
		padding: 0rpx 30rpx 0rpx 30rpx;
	}
</style>